package com.ruihu.admin.module.support.task.controller;

import com.ruihu.admin.module.support.task.service.AIImageDyTask;
import com.ruihu.admin.module.support.task.service.DyTaskService;
import io.swagger.annotations.Api;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = {"动态任务"})
public class DyTaskController {

    @Autowired
    private DyTaskService dyTaskService;

    @PostMapping("/scheduletask")
    public String scheduleTask(@Param("cron") String cron) {
//        dyTaskService.scheduleTask(1L, new AIImageDyTask(1L), cron);

        return "success";
    }
}
